<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title>图片轮换</title>
<style type="text/css">
#tabs{
width:1200px;
height:320px;
overflow:hidden;
float:left;
position:relative;}

#tabs>a:not(:first-child){
display:none;}
</style>
<script type="text/javascript">
var len = document.getElementsByName("i");//获取name属性值为i的元素
var pos = 0;//定义变量值为0
function changeimage(){
	len[pos].style.display = "none";//隐藏元素
	pos++;//变量值加1
	if(pos == len.length) pos=0;//变量值重新定义为0
	len[pos].style.display = "block";//显示元素
}
setInterval('changeimage()',3000);//每隔3秒钟执行一次changeimage()函数
</script>
</head>
<body>
	<div id='tabs'>
		<a name="i" href="#"><img src="video/13.png" width="100%" height="320" /></a>
		<a name="i" href="#"><img src="video/14.png" width="100%" height="320" /></a>			
	</div>
</body>
</html>
